<div class="box-tools" style="top:10px;">
  <form class="form-inline" id="project—form" action="{:url('Rank/rlist')}" method="GET" pjax-search="">
    <div class="form-group">
      <label for="search">投资类型</label>
      <select class="form-control" name="name" style="border-radius:3px;">
        <option value="">全部</option>
        {volist name="rankList" id="rank"}
        <option value="{$rank.rankname}" {if condition="input('name') eq $rank.rankname" }selected="selected" {/if} >{$rank.rankname}</option>
        {/volist}
      </select>
    </div>
    <div class="form-group">
      <label for="search">关键字</label>
      <input type="text" name="search" id="search" class="form-control" value="{:input('get.search')}"
             placeholder="按会员姓名搜索"/>
      <div class="input-group-btn"></div>
    </div>
    <div class="form-group">
      <button type="submit" class="btn btn-primary sreachs">搜索</button>
      <button type="button" id="dwonload" class="btn btn-primary sreachs">下载</button>
      <button type="button" class="btn btn-primary" onclick="resetForm()">重置</button>
    </div>
  </form>
</div>
<script>
    $(function () {
        $('#dwonload').click(function () {
            var url = "{:url('Rank/rlist')}";
            var name = $("select[name='name']").val();
            var search = $("input[name='search']").val();
            location.href = url + "?name=" + name + "&search=" + search + "&down=1";
        })
    })

    function resetForm() {
        $('select[name="name"]').val('-3')
        $('input[name="search"]').val('')
        $('#project—form').submit()
    }
</script>